//
//  CTVChannelPlayerController.h
//  Channltv
//
//  Created by Bruno Keymolen on 20/09/07.
//  Copyright 2007 channl.tv. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "CTVClip.h"
#import "CTVChannel.h"
#import "CTVRateMediaController.h"
//#import "CTVMediadownload.h"
#import "CTVMediaDownloadController.h"
#import "CTVVideoPlayerController.h"
#import "CTVIntroPlayerController.h"
#import "CTVChannelSwitchInfoController.h"
#import "CTVChannelInfoOverlayController.h"

@interface CTVChannelPlayerController : BRLayerController {
//	CTVClip* m_clip;
//	CTVChannel* m_channel;
	CTVVideoPlayerController* m_videoPlayerController;
	CTVRateMediaController* m_rateController;
//CTVMediaDownload* m_downloadController;
	CTVMediaDownloadController* m_downloadController;
	CTVIntroPlayerController* m_introController;
	CTVChannelSwitchInfoController* m_channelSwitchController;
	BRImageControl* m_bgimage;
	BOOL m_stopPlaying;
	NSString* m_introID;
	CTVChannel* m_oldChannel;
	BOOL m_channelSwtichInvoked;
	NSTimer* m_playClipTimer;
	NSTimer* m_channelSwitchTimer;
	CTVChannelInfoOverlayController* m_showInfoController;
}



-(id)initWithScene:(BRRenderScene*)scene forChannel:(CTVChannel*)channel startWithClip:(CTVClip*)clip;
-(void)dealloc;

-(void)setClip:(CTVClip*)clip;
-(CTVClip*)clip;
-(void)playClip;
-(CTVClip*)getNearClip:(int)distance; 
- (void)playClipTimed;
- (void)channelSwitchTimed;

//BRLayerController
//- (void)willBeExhumed;
- (void)wasBuriedByPushingController:(id)fp8;
- (void)wasExhumedByPoppingController:(id)fp8;
- (id)popAnimation;
- (id)pushAnimation;
- (void)activate;
- (void)willLoseFocus;
- (void)willRegainFocus;
- (void)willDeactivate;
- (void)deactivate;
- (BOOL)fadeLayerIn;
- (void)setDeletterboxAssetArtwork:(BOOL)fp8;
- (id)layer;
- (BOOL)brEventAction:(BREvent*)fp8;


//Private 
-(void)_layout;
-(void)_playClipTimed:(NSTimer*)timer;
-(void)_channelSwitchTimed:(NSTimer*)timer;


@end 
